﻿<Frame x:Class="StockManagement.Views.ProductsPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
       xmlns:sys="clr-namespace:System;assembly=mscorlib"
       xmlns:helper="clr-namespace:StockManagement.Helper"
       xmlns:views="clr-namespace:StockManagement.Views" Margin="2" Padding="2" NavigationUIVisibility="Hidden">
    <Frame.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF6E46AD" Offset="1"/>
            <GradientStop Color="#FF7BBCE5" Offset="0.53"/>
            <GradientStop Color="#FFFBFBFB" Offset="0.004"/>
        </LinearGradientBrush>
    </Frame.Background>
    <Frame.Content>
        <Grid x:Name="_mainGrid" VerticalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.4*" ></ColumnDefinition>
                <ColumnDefinition Width="0.6*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <ScrollViewer VerticalScrollBarVisibility="Auto">
                <StackPanel Orientation="Vertical" CanVerticallyScroll="True">
                    <GroupBox Margin="5" Padding="3">
                        <Expander Header="Add/Edit Product" IsExpanded="True">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"></RowDefinition>
                                    <RowDefinition Height="*"></RowDefinition>
                                </Grid.RowDefinitions>
                                <StackPanel Orientation="Horizontal" Grid.ColumnSpan="3">
                                    <RadioButton x:Name="rdAddProduct" Content="Add Product" GroupName="addedit" Margin="5" Padding="3" Checked="rdAddProduct_Checked" VerticalContentAlignment="Center" VerticalAlignment="Center"></RadioButton>
                                    <RadioButton Content="Edit Product" GroupName="addedit" Margin="5" Padding="3" Checked="rdAddProduct_Checked" VerticalContentAlignment="Center" VerticalAlignment="Center"></RadioButton>
                                </StackPanel>
                                <Frame x:Name="addeditFrame" Grid.Row="1"></Frame>
                            </Grid>
                        </Expander>
                    </GroupBox>

                    <GroupBox Margin="5" Padding="3" Grid.Row="1">
                        <Expander Header="Inward Product(Consume)">
                            <views:InwardProductIN x:Name="_inwardProductINPage" DataContext="{Binding Path=InwardProductIN}"></views:InwardProductIN>
                        </Expander>
                    </GroupBox>

                    <GroupBox Margin="5" Padding="3" Grid.Row="2">
                        <Expander Header="Inward Product(Completed)">
                            <views:InwardProductOUT x:Name="_inwardProductOUTPage" DataContext="{Binding Path=InwardProductOUT}"></views:InwardProductOUT>
                        </Expander>
                    </GroupBox>

                    <GroupBox Margin="5" Padding="3" Grid.Row="3">
                        <Expander Header="Outward Product">
                            <views:OutwardProduct x:Name="_outwardProductPage" DataContext="{Binding Path=OutwardProduct}"></views:OutwardProduct>
                        </Expander>
                    </GroupBox>
                </StackPanel>
            </ScrollViewer>
            <GridSplitter Grid.RowSpan="5" Width="3" VerticalAlignment="Stretch" Background="{StaticResource HeaderBorderBrush}"></GridSplitter>
            <views:ProductGrid Grid.Column="1" Grid.RowSpan="3" DataContext="{Binding Path=ProductGrid}"></views:ProductGrid>
        </Grid>
    </Frame.Content>
</Frame>
